@using AyBorg.Web.Shared.Models.Cognitive;

<MudDialog>
    <DialogContent>
        <MudTextField T="string" Label="Name" @bind-Value="@Name" Immediate/>
        @if(ShowDatasetSelection)
        {
            <MudSelect T="DatasetMeta" Label="Dataset" Text="@_datasetName" @bind-Value="@_selectedDatasetMeta">
                @foreach(var datasetMeta in _datasetMetas)
                {
                    <MudSelectItem Value="@datasetMeta">@datasetMeta.Name</MudSelectItem>
                }
            </MudSelect>
        }
        <MudSlider Min="1" Max="1000" @bind-Value="_iterations">
            Iterations: @_iterations
        </MudSlider>
    </DialogContent>
    <DialogActions>
        <MudButton Color="Color.Default" OnClick="CancelClicked">
            Cancel
        </MudButton>
        <MudButton Color="Color.Primary" Variant="Variant.Filled" OnClick="StartClicked" Disabled="@_isStartDisabled">
            Start
        </MudButton>
    </DialogActions>
</MudDialog>
